﻿using Abp.Dependency;
using RabbitMQ.GNClient;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GN.Pay.Core.Tasks.Queue
{
    /// <summary>
    /// 生产队列
    /// </summary>
    public interface IProduceQueue : IQueue, ITransientDependency
    {
        /// <summary>
        /// 发布
        /// </summary>
        /// <param name="message">消息</param>
        /// <param name="delayConsumer">延迟</param>
        void Publish(ObjectMessage message, TimeSpan? delayConsumer = null);

        /// <summary>
        /// 异步发布
        /// </summary>
        /// <param name="message">消息</param>
        /// <param name="delayConsumer">延迟</param>
        Task PublishAsync(ObjectMessage message, TimeSpan? delayConsumer = null);
    }
}
